function getFrame() {
    var getData = $$.localStore("menu");
    for (var d = 0, length = getData.length; d < length; ++d) {
        if (getData[d].child) {
            var menu = getData[d].child;
        }
    }
    var pathAction = '/' + $$.c.path[0] + '/' + $$.c.path[1] + '/' + $$.c.path[2];
    if (pathAction == '/sys/home/index')
        $$.sessionStore('a', 'x');
    for (var i = 0, len = menu.length; i < len; ++i) {
        if (menu[i].child) {
            for (var j = 0, l = menu[i].child.length; j < l; ++j) {
                if (!$$.sessionStore('a') && menu[i].child[j].url == pathAction) {
                    $$.sessionStore('a', menu[i].child[j].id);
                }
                if (menu[i].child[j].url == pathAction) {
                    $$.sessionStore('a', menu[i].child[j].id);
                } else if ($$.sessionStore('a') && menu[i].child[j].id == $$.sessionStore('a')) {
                    $$.sessionStore('a', menu[i].child[j].id);
                }
            }
        }
    }
    if (!$$.sessionStore('a'))
        location.href = '/sys/home/error.html';
    return menu
}
module.exports = {
    data: function () {
        return {
            nav_data: getFrame(),
            actionId: $$.sessionStore('a')
        };
    },
    template: require("./tpl/menu_child.htm")
};
